import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { TextField, Col, Row } from '@folio/stripes/components';
import { FormattedMessage, injectIntl } from 'react-intl';

class CakeFruit extends Component {
  static propTypes = {
    actData: PropTypes.shape({
      activityName: PropTypes.string,
      activityDateTime: PropTypes.string,
      quota: PropTypes.string,
      surplus: PropTypes.string
    }).isRequired,
    intl: PropTypes.func
  };

  render() {
    const { intl } = this.props;

    return (
      <Row style={{ width: '100%' }}>
        <Col xs={3}>
          <TextField
            name="partyName"
            placeholder={intl.formatMessage({ id: 'ui-party.loans.columns.party.partyName' })}
            value={this.props.actData.partyName}
            label={
              intl.formatMessage({ id: 'ui-party.loans.columns.party.partyName' })
            }
            disabled
            required
          />
        </Col>
        <Col xs={3}>
          <TextField
            disabled
            name="activityDateTime"
            label={
              intl.formatMessage({ id: 'ui-party.loans.columns.party.partyDate' })
            }
            placeholder={intl.formatMessage({ id: 'ui-party.loans.columns.party.partyDate' })}
            required
            value={this.props.actData.partyStartDate}
          />
        </Col>
        <Col xs={3}>
          <TextField
            name="quota"
            value={this.props.actData.quota}
            label={
              intl.formatMessage({ id: 'ui-party.loans.columns.party.quota' })
            }
            placeholder={intl.formatMessage({ id: 'ui-party.loans.columns.party.quota' })}
            required
            disabled
          />
        </Col>
        <Col xs={3}>
          <TextField
            label={
              intl.formatMessage({ id: 'ui-party.reserve.add.reserveAmount' })
            }
            placeholder={intl.formatMessage({ id: 'ui-party.reserve.add.reserveAmount' })}
            name="surplus"
            value={this.props.actData.surplus}
            required
            disabled
          />
        </Col>
      </Row>
    );
  }
}

export default injectIntl(CakeFruit);
